import React from 'react';
import './App.scss';

import {
    BrowserRouter as Router,
    Switch,
    Redirect,
    Route,
} from 'react-router-dom';
import Tally from './views/Tally';
import Details from './views/Details';
import Charts from './views/Charts';
import NoMatch from './views/NoMatch';


function App() {
    return (
        <Router>
            <Switch>
                <Route path="/tally">
                    <Tally/>
                </Route>
                <Route path="/details">
                    <Details/>
                </Route>
                <Route path="/charts">
                    <Charts/>
                </Route>
                <Redirect exact from="/" to="/tally"/>
                <Route path="*">
                    <NoMatch/>
                </Route>
            </Switch>
        </Router>
    );
}

export default App;
